p <- read.csv("p_imputed.csv")

c1 <- lm(data = p, formula = log(CI) ~ log(Chamber) + factor(State) + factor(Year))
e1 <- lm(data = p, formula = log(EI) ~ log(Chamber) + factor(State) + factor(Year))
c2 <- lm(data = p, formula = log(CI_Lag1) ~ log(Chamber) + factor(State) + factor(Year))
e2 <- lm(data = p, formula = log(EI_Lag1) ~ log(Chamber) + factor(State) + factor(Year))

export_summs(c1, e1, c2, e2, robust = "HC3", model.names = c("Carbon Intensity", "Energy Intensity", "Carbon Intensity, DV Lag k=1", "Energy Intensity, DV Lag k=1"))
## Registered S3 methods overwritten by 'broom':
##   method            from  
##   tidy.glht         jtools
##   tidy.summary.glht jtools
Carbon IntensityEnergy IntensityCarbon Intensity, DV Lag k=1Energy Intensity, DV Lag k=1
(Intercept)4.02 ***2.19 ***3.95 ***2.25 ***
(0.12)   (0.18)   (0.12)   (0.17)   
log(Chamber)0.04    0.27 ***0.07    0.24 ** 
(0.05)   (0.08)   (0.05)   (0.07)   
factor(State)AL-0.09 ***-0.24 ***-0.08 ***-0.23 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)AR-0.05 ***-0.27 ***-0.05 ** -0.26 ***
(0.02)   (0.03)   (0.02)   (0.03)   
factor(State)AZ-0.07 ***-0.92 ***-0.06 ***-0.91 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)CA-0.10 ***-1.24 ***-0.09 ***-1.23 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)CO0.13 ***-0.94 ***0.14 ***-0.93 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)CT-0.19 ***-1.38 ***-0.18 ***-1.37 ***
(0.02)   (0.03)   (0.02)   (0.03)   
factor(State)DE0.13 ***-1.03 ***0.14 ***-1.03 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)FL0.03 ** -0.94 ***0.04 ***-0.93 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)GA-0.02    -0.74 ***-0.01    -0.73 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)HI0.17 ***-1.12 ***0.17 ***-1.11 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)IA-0.01    -0.37 ***0.01    -0.37 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)ID-0.36 ***-0.40 ***-0.36 ***-0.39 ***
(0.02)   (0.03)   (0.02)   (0.03)   
factor(State)IL-0.12 ***-0.87 ***-0.11 ***-0.86 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)IN0.24 ***-0.37 ***0.25 ***-0.36 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)KS0.04 *  -0.51 ***0.05 ***-0.50 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)KY0.26 ***-0.24 ***0.26 ***-0.24 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)LA-0.15 ***0.26 ***-0.15 ***0.25 ***
(0.01)   (0.04)   (0.01)   (0.04)   
factor(State)MA0.01    -1.33 ***0.02    -1.32 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)MD0.01    -1.05 ***0.02    -1.04 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)ME-0.33 ***-0.54 ***-0.32 ***-0.53 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)MI0.01    -0.71 ***0.02    -0.70 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)MN-0.06 ***-0.75 ***-0.05 ***-0.75 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)MO0.20 ***-0.68 ***0.20 ***-0.67 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)MS-0.05 ***-0.15 ***-0.04 ***-0.15 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)MT0.03 *  -0.27 ***0.03 ** -0.26 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)NC-0.04 ***-0.81 ***-0.03 ** -0.80 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)ND0.26 ***-0.07 *  0.26 ***-0.06    
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)NE-0.01    -0.52 ***-0.01    -0.51 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)NH-0.32 ***-1.07 ***-0.31 ***-1.06 ***
(0.02)   (0.03)   (0.02)   (0.03)   
factor(State)NJ-0.10 ***-1.06 ***-0.10 ***-1.05 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)NM0.17 ***-0.51 ***0.18 ***-0.51 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)NV0.04 ** -0.93 ***0.05 ***-0.92 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)NY-0.16 ***-1.45 ***-0.16 ***-1.44 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)OH0.15 ***-0.67 ***0.15 ***-0.66 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)OK0.06 ***-0.35 ***0.06 ***-0.34 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)OR-0.44 ***-0.78 ***-0.44 ***-0.77 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)PA-0.03 *  -0.79 ***-0.02    -0.78 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)RI-0.00    -1.21 ***0.00    -1.21 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)SC-0.25 ***-0.39 ***-0.24 ***-0.38 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)SD-0.24 ***-0.46 ***-0.23 ***-0.46 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)TN-0.03 ** -0.54 ***-0.03 *  -0.53 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)TX-0.10 ***-0.39 ***-0.09 ***-0.38 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)UT0.23 ***-0.78 ***0.23 ***-0.77 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)VA-0.05 ***-0.85 ***-0.04 ***-0.84 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)VT-0.52 ***-0.91 ***-0.51 ***-0.91 ***
(0.02)   (0.03)   (0.03)   (0.03)   
factor(State)WA-0.46 ***-0.92 ***-0.46 ***-0.90 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)WI0.02    -0.68 ***0.03 *  -0.68 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)WV0.35 ***-0.19 ***0.35 ***-0.19 ***
(0.01)   (0.03)   (0.01)   (0.03)   
factor(State)WY0.30 ***0.02    0.31 ***0.02    
(0.01)   (0.03)   (0.01)   (0.04)   
factor(Year)1999-0.01    -0.02                  
(0.01)   (0.02)                 
factor(Year)20000.01    -0.03    -0.01    -0.02    
(0.01)   (0.01)   (0.01)   (0.02)   
factor(Year)20010.02    -0.06 ***0.01    -0.03 *  
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20020.01    -0.07 ***0.02 *  -0.07 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20030.02    -0.09 ***0.01    -0.08 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20040.02    -0.11 ***0.02 *  -0.10 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20050.01    -0.13 ***0.02    -0.11 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20060.00    -0.17 ***0.01    -0.14 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20070.00    -0.16 ***0.00    -0.17 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2008-0.02    -0.19 ***0.00    -0.17 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2009-0.04 ***-0.21 ***-0.02    -0.19 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2010-0.05 ***-0.19 ***-0.04 ***-0.21 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2011-0.07 ***-0.22 ***-0.05 ***-0.20 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2012-0.09 ***-0.27 ***-0.07 ***-0.23 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2013-0.09 ***-0.25 ***-0.09 ***-0.27 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2014-0.09 ***-0.25 ***-0.09 ***-0.25 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2015-0.10 ***-0.29 ***-0.09 ***-0.26 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2016-0.11 ***-0.31 ***-0.10 ***-0.29 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2017-0.13 ***-0.32 ***-0.11 ***-0.31 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2018-0.13 ***-0.31 ***-0.13 ***-0.32 ***
(0.01)   (0.02)   (0.01)   (0.01)   
factor(Year)2019-0.14 ***-0.33 ***-0.13 ***-0.31 ***
(0.01)   (0.02)   (0.01)   (0.02)   
factor(Year)2020-0.18 ***-0.38 ***-0.14 ***-0.33 ***
(0.01)   (0.02)   (0.01)   (0.02)   
N1134       1134       1084       1084       
R20.96    0.98    0.96    0.98    
Standard errors are heteroskedasticity robust. *** p < 0.001; ** p < 0.01; * p < 0.05.
vip(c1,scale=TRUE)

vip(e1,scale=TRUE)

c3 <- lm(data = p, formula = log(CI) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))
e3 <- lm(data = p, formula = log(EI) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))
c4 <- lm(data = p, formula = log(CI_Lag1) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))
e4 <- lm(data = p, formula = log(EI_Lag1) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))

plot(c3)

export_summs(c3, e3, c4, e4, model.names = c("Carbon Intensity", "Energy Intensity", "Carbon Intensity, DV Lag k=1", "Energy Intensity, DV Lag k=1"))
Carbon IntensityEnergy IntensityCarbon Intensity, DV Lag k=1Energy Intensity, DV Lag k=1
(Intercept)4.29 ***3.28 ***4.02 ***3.43 ***
(0.25)   (0.43)   (0.27)   (0.45)   
log(Chamber)0.07    2.23 ***0.11    2.21 ***
(0.07)   (0.11)   (0.07)   (0.11)   
log(Renewables)-1.85 ***0.17    -1.81 ***0.20 *  
(0.05)   (0.09)   (0.06)   (0.09)   
log(NatGas)-0.37 ***0.18    -0.37 ***0.17    
(0.05)   (0.09)   (0.06)   (0.10)   
log(ManuUnion)0.82 ***1.05 ***0.82 ***1.07 ***
(0.07)   (0.12)   (0.07)   (0.12)   
log(FarmWages)0.05 ***0.01    0.05 ***0.01    
(0.01)   (0.01)   (0.01)   (0.01)   
log(MiningWages)0.04 ***0.10 ***0.04 ***0.10 ***
(0.00)   (0.01)   (0.00)   (0.01)   
log(IncomePC)0.04 *  -0.51 ***0.06 ** -0.52 ***
(0.02)   (0.03)   (0.02)   (0.03)   
log(Population)-0.02 ***-0.08 ***-0.02 ***-0.08 ***
(0.00)   (0.01)   (0.00)   (0.01)   
N1086       1086       1038       1038       
R20.67    0.74    0.65    0.74    
*** p < 0.001; ** p < 0.01; * p < 0.05.
plot_summs(c3, e3, c4, e4, model.names = c("Carbon Intensity", "Energy Intensity", "Carbon Intensity, DV Lag k=1", "Energy Intensity, DV Lag k=1"), robust = "HC3")
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed

vif(c3)
##     log(Chamber)  log(Renewables)      log(NatGas)   log(ManuUnion) 
##         1.267898         1.781571         1.602661         1.120404 
##   log(FarmWages) log(MiningWages)    log(IncomePC)  log(Population) 
##         1.980383         1.924682         1.507999         1.356945
vif(e3)
##     log(Chamber)  log(Renewables)      log(NatGas)   log(ManuUnion) 
##         1.267898         1.781571         1.602661         1.120404 
##   log(FarmWages) log(MiningWages)    log(IncomePC)  log(Population) 
##         1.980383         1.924682         1.507999         1.356945
vif(c4)
##     log(Chamber)  log(Renewables)      log(NatGas)   log(ManuUnion) 
##         1.273816         1.800546         1.616469         1.113274 
##   log(FarmWages) log(MiningWages)    log(IncomePC)  log(Population) 
##         1.993267         1.932252         1.510376         1.362981
vif(e4)
##     log(Chamber)  log(Renewables)      log(NatGas)   log(ManuUnion) 
##         1.273816         1.800546         1.616469         1.113274 
##   log(FarmWages) log(MiningWages)    log(IncomePC)  log(Population) 
##         1.993267         1.932252         1.510376         1.362981
vip(c3,scale=TRUE)

vip(e3,scale=TRUE)

vip(c4,scale=TRUE)

vip(e4,scale=TRUE)

min(p$FarmWages)
## [1] 0.0003000161
cooks_c1 <- cooks.distance(c1)

threshold <- 4 / (nrow(p) - length(c1$coefficients) - 1)

influential_points <- which(cooks_c1 > threshold)
clean_c1 <- p[-influential_points, ]

cooks_e1 <- cooks.distance(e1)

threshold <- 4 / (nrow(p) - length(e1$coefficients) - 1)

influential_points <- which(cooks_e1 > threshold)
clean_e1 <- p[-influential_points, ]

cooks_c2 <- cooks.distance(c2)

threshold <- 4 / (nrow(p) - length(c2$coefficients) - 2)

influential_points <- which(cooks_c2 > threshold)
clean_c2 <- p[-influential_points, ]

cooks_e2 <- cooks.distance(e2)

threshold <- 4 / (nrow(p) - length(e2$coefficients) - 2)

influential_points <- which(cooks_e2 > threshold)
clean_e2 <- p[-influential_points, ]

c1_reduced <- lm(data = clean_c1, formula = log(CI) ~ log(Chamber) + factor(State) + factor(Year))
e1_reduced <- lm(data = clean_e2, formula = log(EI) ~ log(Chamber) + factor(State) + factor(Year))
c2_reduced <- lm(data = clean_c1, formula = log(CI_Lag1) ~ log(Chamber) + factor(State) + factor(Year))
e2_reduced <- lm(data = clean_e2, formula = log(EI_Lag1) ~ log(Chamber) + factor(State) + factor(Year))

export_summs(c1_reduced, e1_reduced, c2_reduced, e2_reduced, robust = "HC3", model.names = c("Carbon Intensity", "Energy Intensity", "Carbon Intensity, DV Lag k=1", "Energy Intensity, DV Lag k=1"))
Carbon IntensityEnergy IntensityCarbon Intensity, DV Lag k=1Energy Intensity, DV Lag k=1
(Intercept)4.01 ***2.23 ***3.92 ***2.35 ***
(0.11)   (0.18)   (0.11)   (0.17)   
log(Chamber)0.04    0.23 ** 0.08    0.18 *  
(0.05)   (0.08)   (0.05)   (0.07)   
factor(State)AL-0.09 ***-0.21 ***-0.08 ***-0.20 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)AR-0.05 ***-0.24 ***-0.05 ***-0.23 ***
(0.02)   (0.03)   (0.01)   (0.04)   
factor(State)AZ-0.07 ***-0.89 ***-0.06 ***-0.88 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)CA-0.10 ***-1.21 ***-0.09 ***-1.19 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)CO0.13 ***-0.91 ***0.14 ***-0.90 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)CT-0.19 ***-1.35 ***-0.18 ***-1.35 ***
(0.02)   (0.03)   (0.02)   (0.04)   
factor(State)DE0.13 ***-1.00 ***0.14 ***-1.00 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)FL0.03 ** -0.91 ***0.04 ***-0.89 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)GA-0.02    -0.70 ***-0.01    -0.69 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)HI0.17 ***-1.08 ***0.17 ***-1.08 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)IA0.03    -0.33 ***0.05 ** -0.32 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)ID-0.36 ***-0.37 ***-0.37 ***-0.36 ***
(0.02)   (0.03)   (0.02)   (0.04)   
factor(State)IL-0.11 ***-0.84 ***-0.10 ***-0.83 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)IN0.25 ***-0.34 ***0.25 ***-0.33 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)KS0.04 *  -0.48 ***0.05 ** -0.47 ***
(0.02)   (0.03)   (0.01)   (0.04)   
factor(State)KY0.26 ***-0.22 ***0.26 ***-0.21 ***
(0.01)   (0.04)   (0.01)   (0.04)   
factor(State)LA-0.15 ***0.29 ***-0.15 ***0.29 ***
(0.01)   (0.04)   (0.01)   (0.04)   
factor(State)MA0.01    -1.31 ***0.02    -1.30 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)MD0.02    -1.02 ***0.03 *  -1.01 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)ME-0.33 ***-0.51 ***-0.32 ***-0.50 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)MI0.01    -0.68 ***0.02    -0.67 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)MN-0.05 ***-0.72 ***-0.05 ***-0.72 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)MO0.20 ***-0.65 ***0.20 ***-0.64 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)MS-0.04 ***-0.12 ***-0.04 ***-0.11 ** 
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)MT0.03 *  -0.24 ***0.04 ** -0.23 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)NC-0.04 ** -0.78 ***-0.03 ** -0.76 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)ND0.26 ***-0.03    0.26 ***-0.03    
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)NE-0.01    -0.49 ***-0.01    -0.48 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)NH-0.32 ***-1.04 ***-0.31 ***-1.03 ***
(0.02)   (0.03)   (0.02)   (0.04)   
factor(State)NJ-0.10 ***-1.03 ***-0.09 ***-1.02 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)NM0.17 ***-0.48 ***0.18 ***-0.48 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)NV0.05 ** -0.90 ***0.05 ***-0.89 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)NY-0.16 ***-1.42 ***-0.15 ***-1.41 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)OH0.15 ***-0.64 ***0.15 ***-0.63 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)OK0.06 ***-0.31 ***0.06 ***-0.30 ***
(0.02)   (0.03)   (0.02)   (0.04)   
factor(State)OR-0.44 ***-0.75 ***-0.44 ***-0.74 ***
(0.01)   (0.04)   (0.01)   (0.04)   
factor(State)PA-0.02    -0.76 ***-0.02    -0.75 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)RI0.00    -1.18 ***0.01    -1.17 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)SC-0.25 ***-0.37 ***-0.25 ***-0.35 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)SD-0.25 ***-0.43 ***-0.24 ***-0.42 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)TN-0.03 *  -0.51 ***-0.02    -0.50 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)TX-0.09 ***-0.35 ***-0.09 ***-0.34 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)UT0.24 ***-0.76 ***0.24 ***-0.74 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)VA-0.04 ***-0.82 ***-0.04 ***-0.81 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)VT-0.53 ***-0.89 ***-0.53 ***-0.88 ***
(0.03)   (0.03)   (0.03)   (0.04)   
factor(State)WA-0.46 ***-0.91 ***-0.45 ***-0.89 ***
(0.02)   (0.04)   (0.02)   (0.04)   
factor(State)WI0.03 *  -0.65 ***0.03 ** -0.64 ***
(0.01)   (0.03)   (0.01)   (0.04)   
factor(State)WV0.35 ***-0.16 ***0.35 ***-0.16 ***
(0.01)   (0.04)   (0.01)   (0.04)   
factor(State)WY0.31 ***0.05    0.31 ***0.05    
(0.01)   (0.04)   (0.01)   (0.04)   
factor(Year)1999-0.01    -0.01                  
(0.01)   (0.02)                 
factor(Year)20000.00    -0.04 *  -0.01    -0.03    
(0.01)   (0.02)   (0.01)   (0.02)   
factor(Year)20010.02    -0.07 ***0.01    -0.04 ** 
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20020.01    -0.07 ***0.02 *  -0.07 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20030.02 *  -0.09 ***0.01    -0.08 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20040.02 *  -0.11 ***0.02 *  -0.10 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20050.01    -0.14 ***0.02 *  -0.12 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20060.00    -0.17 ***0.02 *  -0.14 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)20070.00    -0.16 ***0.00    -0.17 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2008-0.02 *  -0.18 ***0.00    -0.17 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2009-0.04 ***-0.20 ***-0.01    -0.19 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2010-0.05 ***-0.19 ***-0.04 ***-0.21 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2011-0.07 ***-0.22 ***-0.04 ***-0.20 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2012-0.09 ***-0.26 ***-0.07 ***-0.22 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2013-0.08 ***-0.24 ***-0.08 ***-0.27 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2014-0.09 ***-0.25 ***-0.08 ***-0.25 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2015-0.10 ***-0.29 ***-0.09 ***-0.26 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2016-0.11 ***-0.30 ***-0.09 ***-0.29 ***
(0.01)   (0.01)   (0.01)   (0.01)   
factor(Year)2017-0.12 ***-0.31 ***-0.11 ***-0.31 ***
(0.01)   (0.02)   (0.01)   (0.01)   
factor(Year)2018-0.13 ***-0.30 ***-0.12 ***-0.32 ***
(0.01)   (0.02)   (0.01)   (0.02)   
factor(Year)2019-0.14 ***-0.33 ***-0.13 ***-0.31 ***
(0.01)   (0.02)   (0.01)   (0.02)   
factor(Year)2020-0.17 ***-0.37 ***-0.14 ***-0.33 ***
(0.01)   (0.02)   (0.01)   (0.02)   
N1079       1068       1033       1020       
R20.97    0.98    0.97    0.98    
Standard errors are heteroskedasticity robust. *** p < 0.001; ** p < 0.01; * p < 0.05.
cooks_c3 <- cooks.distance(c3)

threshold <- 4 / (nrow(p) - length(c3$coefficients) - 1)

influential_points <- which(cooks_c3 > threshold)
clean_c3 <- p[-influential_points, ]

cooks_e3 <- cooks.distance(e3)

threshold <- 4 / (nrow(p) - length(e3$coefficients) - 1)

influential_points <- which(cooks_e3 > threshold)
clean_e3 <- p[-influential_points, ]

cooks_c4 <- cooks.distance(c4)

threshold <- 4 / (nrow(p) - length(c4$coefficients) - 1)

influential_points <- which(cooks_c4 > threshold)
clean_c4 <- p[-influential_points, ]

cooks_e4 <- cooks.distance(e4)

threshold <- 4 / (nrow(p) - length(e4$coefficients) - 1)

influential_points <- which(cooks_e4 > threshold)
clean_e4 <- p[-influential_points, ]

c3_reduced <- lm(data = clean_c3, formula = log(CI) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))
e3_reduced <- lm(data = clean_e3, formula = log(EI) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))
c4_reduced <- lm(data = clean_c4, formula = log(CI_Lag1) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))
e4_reduced <- lm(data = clean_e4, formula = log(EI_Lag1) ~ log(Chamber) + log(Renewables) + log(NatGas) + log(ManuUnion) + log(FarmWages) + log(MiningWages) + log(IncomePC) + log(Population))

plot(c3_reduced)

plot(e3_reduced)

plot_summs(c3_reduced, e3_reduced, c4_reduced, e4_reduced, model.names = c("Carbon Intensity", "Energy Intensity", "Carbon Intensity, DV Lag k=1", "Energy Intensity, DV Lag k=1"), robust = "HC3")
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed

plot_summs(c3, c4, c3_reduced, c4_reduced, model.names = c("Carbon Intensity", "Carbon Intensity, DV Lag k=1", "CI Reduced", "CI Reduced, DV Lag k=1"), robust = "HC3")
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed

plot_summs(e3, e4, e3_reduced, e4_reduced, model.names = c("Energy Intensity", "Energy Intensity, DV Lag k=1", "EI Reduced", "EI Reduced, DV Lag k=1"), robust = "HC3")
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed
## Loading required namespace: broom.mixed